<extend name="./Application/Common/View/block/base.php" />
<block name="header">
    <include file="./Application/Admin/View/block/easyui_header.php" />
    <link href="/extend/umeditor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
    <link href="__PUBLIC__/css/Announce/show.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
</block>
<block name="bdoy">
    <body>
    <form action="" method="post" onsubmit="return $(this).form('validate');">
        <input type="hidden" name="id" value="{$item['id']}"/>
        <table cellspacing="0" width="100%" class="">
            <tr>
                <td class="label"><strong>{:LANG('announce_title')}: </strong></td>
                <td class="form-line">
                    <input value="{$item['title']}" class="easyui-textbox easyui-validatebox input-text" name="title" id="title" size="50" style="height: 24px;line-height: 24px;"
                           data-options="prompt:'请输入标题',required:true,validType:'length[2,50]'">
                </td>

            </tr>
            <tr>
                <td class="label"><strong>{:LANG('writer')}: </strong></td>
                <td class="form-line">
                    <input value="{$item['writer']}" class="easyui-textbox easyui-validatebox input-text" name="writer" id="writer" size="50" style="height: 24px;line-height: 24px;"
                           data-options="prompt:'请输入作者',required:true,validType:'length[2,50]'">
                </td>
            </tr>
            <tr>
                <td class="label"><strong>{:LANG('start_time')}: </strong></td>
                <td class="form-line">
                    <input value="{$item['start_time']}" class="easyui-datetimebox easyui-validatebox"  name="start_time"
                           data-options="prompt:'请输入选择开始时间',required:true,validType:'length[19,19]'">
                </td>
            </tr>
            <tr>
                <td class="label"><strong>{:LANG('end_time')}: </strong></td>
                <td class="form-line">
                    <input value="{$item['end_time']}" class="easyui-datetimebox easyui-validatebox" name="end_time"
                           data-options="prompt:'请选择到期时间',required:true,validType:'length[19,19]'">
                </td>
            </tr>
            <tr>
                <td class="label"><strong>{:LANG('announce_content')}: </strong></td>
                <td class="form-line">
                    <div class="editor-div">
                        <script type="text/plain" id="editor" onabort="content" name="content">{$item['contnet']}</script>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="label"><strong>{:LANG('announce_status')}: </strong></td>
                <td class="form-line radio-line">
                    <label>{:LANG('announce_pass')}</label><input class="radio" type="radio" name="status" id="checked_yes" value="1">
                    &nbsp;&nbsp;&nbsp;
                    <label>{:LANG('announce_wate')}</label><input class="radio" type="radio" name="status" id="checked_no" value="0">
                </td>
            </tr>
            <tr>
                <td class="label"></td>
                <td class="form-line">
                    <input type="submit" class="submit-button bule-button" value="{:LANG('save')}">
                    <input type="button" onclick="close_dialog()" class="submit-button" value="{:LANG('cancle')}">
                </td>
            </tr>
        </table>
    </form>
    </body>
</block>
<block name="footExtendJs">
    <!--百度编辑器-->
    <script type="text/javascript" charset="utf-8" src="/extend/umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/extend/umeditor/umeditor.min.js"></script>
    <script type="text/javascript" src="/extend/umeditor/lang/zh-cn/zh-cn.js"></script>
    <script>
        var serverPath = '/extend/umeditor/php/',
            um = UM.getEditor('editor', {
                imageUrl:serverPath + "imageUp.php",
                imagePath:serverPath,
                lang:/^zh/.test(navigator.language || navigator.browserLanguage || navigator.userLanguage) ? 'zh-cn' : 'en',
                langPath:UMEDITOR_CONFIG.UMEDITOR_HOME_URL + "lang/",
                focus: true
            });

    </script>
    <!--百度编辑器-->
    <script>
        var is_checked = {$item['status']};
        set_checked(is_checked);
        function set_checked(is_checked){
            if(is_checked == 1){
                $('#checked_yes').attr('checked', 'checked');
            }else{
                $('#checked_no').attr('checked', 'checked');
            }
        }
    </script>

</block>
